using System.ComponentModel.DataAnnotations.Schema;

namespace RBAC.Domain.ProcessManagement
{
    /// <summary>
    /// 工艺流程-加工工序明细
    /// </summary>
    [Table("ProcessFlowDetail")]
    public class ProcessFlowDetail : BaseEntity
    {
        /// <summary>
        /// 流程主表ID（外键，仅存Id）
        /// </summary>
        public long FlowId { get; set; }

        /// <summary>
        /// 序号/顺序（用于上移/下移）
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 工序主表ID（引用 ProcessInfo）
        /// </summary>
        public long ProcessId { get; set; }

        /// <summary>
        /// 工序编号（冗余展示）
        /// </summary>
        public string? ProcessCode { get; set; }

        /// <summary>
        /// 工序名称（冗余展示）
        /// </summary>
        public string? ProcessName { get; set; }

        /// <summary>
        /// 负责人用户Id（可覆盖工序默认负责人）
        /// </summary>
        public long? OwnerUserId { get; set; }

        /// <summary>
        /// 负责人用户名
        /// </summary>
        public string? OwnerUserName { get; set; }

        /// <summary>
        /// 所属部门Id（可覆盖工序默认部门）
        /// </summary>
        public long? DepartmentId { get; set; }

        /// <summary>
        /// 所属部门名称
        /// </summary>
        public string? DepartmentName { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
    }
}
